package com.javatip;

import com.javatip.common.utils.HardwareInfo;
import com.javatip.common.utils.RunPythonScript;

import java.io.File;
//import org.springframework.security.core.context.SecurityContextHolder;
//import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
public class tmp {
    public static void main(String[] args) {
//        encryptPassword("123456");
//        System.out.println("注册码："+HardwareInfo.generateRegistrationCode(HardwareInfo.generateApplicationCode()));
        String applcationCode = HardwareInfo.generateApplicationCode();
        System.out.println("申请码："+applcationCode);
        String registrationCode = HardwareInfo.generateRegistrationCode(applcationCode);
//        System.out.println(HardwareInfo.validateRegistrationCode(HardwareInfo.generateApplicationCode(),HardwareInfo.generateRegistrationCode(HardwareInfo.generateApplicationCode())));
        System.out.println("注册码："+registrationCode);
    }

//    public static String encryptPassword(String password) {
//        BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
//        System.out.println("加密前的密码：" + password);
//        String encodedPassword = bCryptPasswordEncoder.encode(password);
//        System.out.println("加密后的密码：" + encodedPassword);
//        return bCryptPasswordEncoder.encode(password);
//    }
}
